/*

	Slug Production	(c)	2002 - http://www.slug-production.be.tf/

	File : "Register-Combiners.h"
	  
	Programmed by : Leyder Dylan (slug-production@be.tf)

		==> Last modification :
				- Version 0.6 by Leyder Dylan
						* The header file

*/

/*
	New header to contain all the Register Combiner tokens.
	Makes it easier to see the Register Combiner specific stuff here, and helps unclutter the main file.

	cos there is quite alot of stuff for Register combiners. - Nutty.

*/


#ifndef _REGISTER_COMBINERS_H_
#define _REGISTER_COMBINERS_H_


#if defined WIN32

#include <windows.h>

#else

#define APIENTRY __stdcall

#endif

//Init prototype.
bool Init_Register_Combiners();
void Setup_Register_Combiners();

//Define values taken from nvOpenGLSpecs.pdf
//Not new values are commented out, but left in for section completeness.


//Extension name.
const char *const REGISTER_COMBINER_STRING = "GL_NV_register_combiners";


//Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv,
//GetFloatv, and GetDoublev:

#define GL_REGISTER_COMBINERS_NV 0x8522

//Accepted by the <stage> parameter of CombinerInputNV,CombinerOutputNV, GetCombinerInputParameterfvNV,
//GetCombinerInputParameterivNV, GetCombinerOutputParameterfvNV,and GetCombinerOutputParameterivNV:

#define GL_COMBINER0_NV 0x8550
#define GL_COMBINER1_NV 0x8551
#define GL_COMBINER2_NV 0x8552
#define GL_COMBINER3_NV 0x8553
#define GL_COMBINER4_NV 0x8554
#define GL_COMBINER5_NV 0x8555
#define GL_COMBINER6_NV 0x8556
#define GL_COMBINER7_NV 0x8557

//Accepted by the <variable> parameter of CombinerInputNV,
//GetCombinerInputParameterfvNV, and GetCombinerInputParameterivNV:

#define GL_VARIABLE_A_NV 0x8523
#define GL_VARIABLE_B_NV 0x8524
#define GL_VARIABLE_C_NV 0x8525
#define GL_VARIABLE_D_NV 0x8526

//Accepted by the <variable> parameter of FinalCombinerInputNV,GetFinalCombinerInputParameterfvNV, and
//GetFinalCombinerInputParameterivNV:

#define GL_VARIABLE_E_NV 0x8527
#define GL_VARIABLE_F_NV 0x8528
#define GL_VARIABLE_G_NV 0x8529

//Accepted by the <input> parameter of CombinerInputNV:

//#define GL_ZERO (not new)
#define GL_CONSTANT_COLOR0_NV 0x852A
#define GL_CONSTANT_COLOR1_NV 0x852B
//#define GL_FOG (not new)
#define GL_PRIMARY_COLOR_NV 0x852C
#define GL_SECONDARY_COLOR_NV 0x852D
#define GL_SPARE0_NV 0x852E
#define GL_SPARE1_NV 0x852F
//#define GL_TEXTURE0_ARB (see ARB_multitexture)
//#define GL_TEXTURE1_ARB (see ARB_multitexture)

//Accepted by the <mapping> parameter of CombinerInputNV:

#define GL_UNSIGNED_IDENTITY_NV 0x8536
#define GL_UNSIGNED_INVERT_NV 0x8537
#define GL_EXPAND_NORMAL_NV 0x8538
#define GL_EXPAND_NEGATE_NV 0x8539
#define GL_HALF_BIAS_NORMAL_NV 0x853A
#define GL_HALF_BIAS_NEGATE_NV 0x853B
#define GL_SIGNED_IDENTITY_NV 0x853C
#define GL_SIGNED_NEGATE_NV 0x853D

//Accepted by the <input> parameter of FinalCombinerInputNV:

//#define GL_ZERO (not new)
//#define GL_CONSTANT_COLOR0_NV
//#define GL_CONSTANT_COLOR1_NV
//#define GL_FOG (not new)
//#define GL_PRIMARY_COLOR_NV
//#define GL_SECONDARY_COLOR_NV
//#define GL_SPARE0_NV
//#define GL_SPARE1_NV
//#define GL_TEXTURE0_ARB (see ARB_multitexture)
//#define GL_TEXTURE1_ARB (see ARB_multitexture)
#define GL_E_TIMES_F_NV 0x8531
#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532

//Accepted by the <mapping> parameter of FinalCombinerInputNV:

//#define GL_UNSIGNED_IDENTITY_NV
//#define GL_UNSIGNED_INVERT_NV

//Accepted by the <scale> parameter of CombinerOutputNV:

//#define GL_NONE (not new)
#define GL_SCALE_BY_TWO_NV 0x853E
#define GL_SCALE_BY_FOUR_NV 0x853F
#define GL_SCALE_BY_ONE_HALF_NV 0x8540

//Accepted by the <bias> parameter of CombinerOutputNV:

//#define GL_NONE (not new)
#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541


//Accepted by the <abOutput>, <cdOutput>, and <sumOutput> parameter of CombinerOutputNV:

#define GL_DISCARD_NV 0x8530
//#define GL_PRIMARY_COLOR_NV
//#define GL_SECONDARY_COLOR_NV
//#define GL_SPARE0_NV
//#define GL_SPARE1_NV
//#define GL_TEXTURE0_ARB (see ARB_multitexture)
//#define GL_TEXTURE1_ARB (see ARB_multitexture)

//Accepted by the <pname> parameter of GetCombinerInputParameterfvNV and GetCombinerInputParameterivNV:

#define GL_COMBINER_INPUT_NV 0x8542
#define GL_COMBINER_MAPPING_NV 0x8543
#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544

//Accepted by the <pname> parameter of GetCombinerOutputParameterfvNV and GetCombinerOutputParameterivNV:

#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
#define GL_COMBINER_MUX_SUM_NV 0x8547
#define GL_COMBINER_SCALE_NV 0x8548
#define GL_COMBINER_BIAS_NV 0x8549
#define GL_COMBINER_AB_OUTPUT_NV 0x854A
#define GL_COMBINER_CD_OUTPUT_NV 0x854B
#define GL_COMBINER_SUM_OUTPUT_NV 0x854C

//Accepted by the <pname> parameter of CombinerParameterfvNV,CombinerParameterivNV, GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv:

//#define GL_CONSTANT_COLOR0_NV
//#define GL_CONSTANT_COLOR1_NV

//Accepted by the <pname> parameter of CombinerParameterfvNV,CombinerParameterivNV, CombinerParameterfNV, CombinerParameteriNV,
//GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv:

#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
#define GL_COLOR_SUM_CLAMP_NV 0x854F

//Accepted by the <pname> parameter of GetFinalCombinerInputParameterfvNV
//and GetFinalCombinerInputParameterivNV:

//#define GL_COMBINER_INPUT_NV
//#define GL_COMBINER_MAPPING_NV
//#define GL_COMBINER_COMPONENT_USAGE_NV

//Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
//GetFloatv, and GetIntegerv:

#define GL_MAX_GENERAL_COMBINERS_NV 0x854D



//The new function prototypes.

typedef void (APIENTRY *PFNGLCOMBINERPARAMETERFVNV) (GLenum pname,const GLfloat *params);
typedef void (APIENTRY *PFNGLCOMBINERPARAMETERIVNV) (GLenum pname,const GLint *params);
typedef void (APIENTRY *PFNGLCOMBINERPARAMETERFNV) (GLenum pname,GLfloat param);
typedef void (APIENTRY *PFNGLCOMBINERPARAMETERINV) (GLenum pname,GLint param);
typedef void (APIENTRY *PFNGLCOMBINERINPUTNV) (GLenum stage,GLenum portion,GLenum variable,GLenum input,GLenum mapping,
											   GLenum componentUsage);
typedef void (APIENTRY *PFNGLCOMBINEROUTPUTNV) (GLenum stage,GLenum portion,GLenum abOutput,GLenum cdOutput,GLenum sumOutput,
												GLenum scale, GLenum bias,GLboolean abDotProduct,GLboolean cdDotProduct,
												GLboolean muxSum);
typedef void (APIENTRY *PFNGLFINALCOMBINERINPUTNV) (GLenum variable,GLenum input,GLenum mapping,GLenum componentUsage);

typedef void (APIENTRY *PFNGLGETCOMBINERINPUTPARAMETERFVNV) (GLenum stage,GLenum portion,GLenum variable,GLenum pname,GLfloat *params);
typedef void (APIENTRY *PFNGLGETCOMBINERINPUTPARAMETERIVNV) (GLenum stage,GLenum portion,GLenum variable,GLenum pname,GLint *params);
typedef void (APIENTRY *PFNGLGETCOMBINEROUTPUTPARAMETERFVNV) (GLenum stage,GLenum portion,GLenum pname,GLfloat *params);
typedef void (APIENTRY *PFNGLGETCOMBINEROUTPUTPARAMETERIVNV) (GLenum stage,GLenum portion,GLenum pname,GLint *params);
typedef void (APIENTRY *PFNGLGETFINALCOMBINERINPUTPARAMETERFVNV) (GLenum variable,GLenum pname,GLfloat *params);
typedef void (APIENTRY *PFNGLGETFINALCOMBINERINPUTPARAMETERIVNV) (GLenum variable,GLenum pname,GLfloat *params);



#if defined __cplusplus
extern "C" {
#endif

// The function pointers for the Register Combiners
extern PFNGLCOMBINERPARAMETERFVNV glCombinerParameterfvNV;
extern PFNGLCOMBINERPARAMETERIVNV glCombinerParameterivNV;
extern PFNGLCOMBINERPARAMETERFNV glCombinerParameterfNV;
extern PFNGLCOMBINERPARAMETERINV glCombinerParameteriNV;
extern PFNGLCOMBINERINPUTNV glCombinerInputNV;
extern PFNGLCOMBINEROUTPUTNV glCombinerOutputNV;
extern PFNGLFINALCOMBINERINPUTNV glFinalCombinerInputNV;

extern PFNGLGETCOMBINERINPUTPARAMETERFVNV glGetCombinerInputParameterfvNV;
extern PFNGLGETCOMBINERINPUTPARAMETERIVNV glGetCombinerInputParameterivNV;
extern PFNGLGETCOMBINEROUTPUTPARAMETERFVNV glGetCombinerOutputParameterfvNV;
extern PFNGLGETCOMBINEROUTPUTPARAMETERIVNV glGetCombinerOutputParameterivNV;
extern PFNGLGETFINALCOMBINERINPUTPARAMETERFVNV glGetFinalCombinerInputParameterfvNV;
extern PFNGLGETFINALCOMBINERINPUTPARAMETERIVNV glGetFinalCombinerInputParameterivNV;
					


#if defined __cplusplus
}
#endif



#endif	//_REGISTER_COMBINERS_H_